//
//  LoanTypeCell.swift
//  KaMengApplication
//
//  Created by DUONIU_MAC on 2018/12/14.
//  Copyright © 2018年 DUONIU_MAC. All rights reserved.
//

import UIKit

class LoanTypeCell: UICollectionViewCell {
    
    let titleLabel = UILabel()
    let textLabel = UILabel()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        self.contentView.layer.borderColor = UIColor.lineColor().cgColor
        self.contentView.layer.borderWidth = 0.5
        
        titleLabel.font = UIFont.systemFont(ofSize: RATIO(maxNum: 16))
        self.contentView.addSubview(titleLabel)
        
        textLabel.font = UIFont.systemFont(ofSize: RATIO(maxNum: 14))
        textLabel.textColor = UIColor.lightGray
        self.contentView.addSubview(textLabel)
        
        textLabel.snp.makeConstraints { (make) in
            make.top.equalTo(self.contentView.snp.centerY)
            make.width.greaterThanOrEqualTo(10)
            make.left.equalToSuperview().offset(RATIO(maxNum: 15))
            make.height.equalTo(RATIO_H(maxNum: 25))
        }
        
        titleLabel.snp.makeConstraints { (make) in
            make.bottom.equalTo(textLabel.snp.top)
            make.left.equalTo(textLabel)
            make.height.equalTo(textLabel)
            make.width.greaterThanOrEqualTo(10)
        }
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
